import { RouteRecordRaw } from "vue-router";

// 一级路由可以防止白屏
import HomePage from "@/views/homePage/index.vue";

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    name: "homePage",
    component: HomePage,
    children: [
      {
        path: "businessPool",
        name: "businessPool",
        component: () => import("@/views/businessPool/index.vue"),
      },
      {
        path: "task",
        name: "task",
        component: () => import("@/views/task/index.vue"),
      },
      {
        path: "my",
        name: "my",
        component: () => import("@/views/my/index.vue"),
      },
    ],
  },
  {
    path: "/businessPool/search",
    name: "search",
    component: () => import("@/views/businessPool/businessSearch/index.vue"),
  },
  {
    path: "/businessPool/details",
    name: "businessPoolDetails",
    component: () => import("@/views/businessPool/businessDetails/index.vue"),
  },
  {
    path: "/businessPub",
    name: "businessPub",
    component: () => import("@/views/businessPub/index.vue"),
  },
  {
    path: "/portrait",
    name: "portrait",
    component: () => import("@/views/businessPub/portrait.vue"),
  },
  {
    path: "/task/details",
    name: "taskDetails",
    component: () => import("@/views/task/taskDetails/index.vue"),
  },
];
export default routes;

